/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Homework;

/**
 *
 * @author 黄璐
 */
public class NewClass {
     private String num;
    private String name;
    private double price;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNum() {
        return num;
    }

    public void setNum(String num) {
        this.num = num;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public NewClass(String num, String name, double price) {
        this.num = num;
        this.name = name;
        this.price = price;
    }
public void display(){

    System.out.println("编号："+num);
    System.out.println("书名："+name);
    System.out.println("价格："+price);
}
    public static void main(String[] args) {
        NewClass s=new NewClass("9787504","Java程序设计基础",37);
       s.display();
    }

}
